package com.example.ioc1.controller;

import com.example.ioc1.model.UserInfo;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Controller;

@Controller("usercon")
public class UserController {
//
//    @Qualifier("userInfo1")
//    @Autowired
//    private UserInfo user;


    @Resource(name = "UCInfo")
    private UserInfo user;

//    public void setUser(UserInfo user) {
//        this.user = user;
//    }

    public void sayHi() {
        System.out.println(user);
        System.out.println("hi, user controller...");
    }
}
